package com.example.contactapp.views;

import com.example.contactapp.objects.ContactObject;

/**
 * Item definition including the section.
 */
public class SectionListItem {
    public ContactObject item;
    public String section;

    public SectionListItem(ContactObject item) {
        super();
        this.item = item;
        section = item.toString().toUpperCase().substring(0, 1);
        if(section.charAt(0) < 'A' || section.charAt(0) > 'Z'){
        	section = "#";
        }
    }

    @Override
    public String toString() {
        return item.toString();
    }

}
